Skip to content

Comments

[TCP] Implement Zero window probe#35

Closed
danielinux wants to merge 5 commits intowolfSSL:masterfrom
danielinux:tcp_zwp
Closed

[TCP] Implement Zero window probe#35
danielinux wants to merge 5 commits intowolfSSL:masterfrom
danielinux:tcp_zwp

Conversation

@danielinux
Copy link
Member

Based on previous PR #34

- Fixed bug in smooth average RTT calculation
- Actually assign calculated RTO value (previously fixed to 1s)
- Enforce min/max RTO according to RFC
- Enforce Karn to only account for new ACK in RTO calculation
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends wolfIP’s TCP behavior to better handle stalled connections by adding a zero-window persist/probe mechanism, while also introducing related TCP RTO/control-RTO updates and accompanying unit tests.

Changes:

  • Add TCP persist timer logic and a 1-byte “zero window probe” send path when the peer advertises a zero receive window.
  • Add/adjust TCP RTO tracking (SRTT/RTTVAR, Karn handling via PKT_FLAG_WAS_RETRANS) and implement control-segment (SYN/FIN) retransmission timing with retry caps.
  • Expand unit tests to cover new RTO/control-RTO behaviors and basic persist/probe behavior; update README TCP feature list.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/wolfip.c Implements persist/probe logic, RFC6298-style RTO updates, Karn handling, and control-segment RTO retries.
src/test/unit/unit.c Adds/updates unit tests for control-RTO, RTO math, Karn skip-on-retrans, and persist/probe basics.
README.md Documents TCP RTO computation support in the feature matrix.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

danielinux added a commit to danielinux/wolfip that referenced this pull request Feb 20, 2026
Fix: probe_seq may be set to snd_una when snd_una falls within an existing queued segment
danielinux added a commit to danielinux/wolfip that referenced this pull request Feb 20, 2026
Proper clean-up on close: Manage ACK in TCP_LAST_ACK state.
danielinux added a commit to danielinux/wolfip that referenced this pull request Feb 20, 2026
@danielinux
Copy link
Member Author

Closing in favor of #36

@danielinux danielinux closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant